import os
import dotenv
from components.log import log

def init_env():
    dotenv.load_dotenv()
    
    log.info("init env ok")



def get_aisites_similarity_topk():
    AI_SITES_SIMILARITY_TOP_K = os.getenv("AI_SITES_SIMILARITY_TOP_K", 10)
    if isinstance(AI_SITES_SIMILARITY_TOP_K, str):
        AI_SITES_SIMILARITY_TOP_K = int(AI_SITES_SIMILARITY_TOP_K)
    
    return AI_SITES_SIMILARITY_TOP_K
